package com.yyc.tool.controller;

import com.yyc.tool.domain.UserInfo;
import com.yyc.tool.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("查询用户信息")
@RequestMapping("user")
@RestController
public class UserController {

    private UserService userService;

    @Autowired
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @GetMapping("id")
    @ApiOperation(value = "获取用户信息", notes = "获取用户信息")
    public UserInfo getUserInfo(String userId){
        return userService.getUserInfo(userId);
    }
}
